package MAIN;

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main4 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int menoy = 0;
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            float kg = in.nextFloat();
            String yORn = in.nextLine();
            kg = (kg /10) + 1;
            if (kg <= 1) {
                menoy = 20;
            }else {
                int plus = (int) (kg - 1);
                menoy = 20 + plus * 1;
            }
            if (yORn.equals("y")) {
                menoy += 5;
            }
        }
        System.out.println(menoy);
    }
}